<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\api\service\WithdrawalService;

class Withdrawal extends Api
{
    protected $noNeedLogin = [];
    protected $noNeedRight = '*';


    // 提现信息
    public function index()
    {
        $data = $this->request->post();
        $res = WithdrawalService::getIndex($data);
        return json($res);
    }

    // 绑定账号
    public function account()
    {
        $data = $this->request->post();
        $res = WithdrawalService::addAccount($data);
        return json($res);
    }

    // 申请提现
    public function apply()
    {
        $data = $this->request->post();
        $res = WithdrawalService::apply($data);
        return json($res);
    }

    // 解冻押金
    public function unfreeze()
    {
        $data = $this->request->post();
        $res = WithdrawalService::unfreeze($data);
        return json($res);
    }

    // 解冻押金
    public function log_list()
    {
        $data = $this->request->post();
        $res = WithdrawalService::logList($data);
        return json($res);
    }

    // 可提现列表
    public function list()
    {
        $data = $this->request->post();
        $res = WithdrawalService::getList($data);
        return json($res);
    }

    
    // 可确认列表
    public function confirm_list()
    {
        $data = $this->request->post();
        $res = WithdrawalService::getConfirmList($data);
        return json($res);
    }
    
    // 可确认列表
    public function confirm()
    {
        $data = $this->request->post();
        $res = WithdrawalService::confirm($data);
        return json($res);
    }


    // 确认收款
    public function payee()
    {
        $data = $this->request->post();
        $res = WithdrawalService::payee($data);
        return json($res);
    }


}